Skip to main content

Create User

This endpoint allows you to create a new user for a business using an HTTP POST request. It requires API key and email for authentication and accepts team details in a JSON request body.


API Endpoint

api/v1/business/user?apikey=<API KEY>&email=<EMAIL ID>

Request Syntax

POST api/v1/business/user?apikey=<API KEY>&email=<EMAIL ID>

Request Body

{
"phoneNumber": "9901425378",
"firstName": "Vinay",
"lastName": "Kumar",
"role": "AGENT",
"emailId": "vinay@lyricslrc.com",
"temporaryPassword": "Pass@1234",
"supervisorId": "a599237d-b12c-4b25-b43c",
"branchId": "34567890"
}

  • Content-Type:
    • application/x-www-form-urlencoded (form-data)
  • Parameters:
    • email: Caller’s EMAIL
    • apikey: API KEY

Properties

PlaceholderTypeRequiredDescription
PhoneNumberstringYesPhone number for calling operations
firstNamestringYesUser first name
lastNamestringNoUser last name
rolestringYesRole to be assigned such as BUSINESS_ADMIN, MANAGER, AGENT, BRANCH_ADMIN
emailIdstringYesEmail address of the user
temporaryPasswordstringNoTemporary password for the user
supervisorIdstringNoSupervisor Id to be assigned for the user
branchIdstringNoBranch Id of the user

Example

Sample Request

curl --location 'https://alb-backend.msgkart.com/api/v1/business/user?apikey=<API KEY>&email=<EMAIL ID>' \
--header 'Content-Type: application/json' \
--data-raw '{
"phoneNumber": "9901425378",
"firstName": "Vinay",
"lastName": "kumar",
"role": "AGENT",
"emailId": "vinay@lyricslrc.com",
"temporaryPassword": "Pass@1234",
"supervisorId": "a599947d-bc5c-4b45-b93c",
"branchId": "34567890"
}'

Response

  • HTTP Status Code: 200 OK (successful), 4xx/5xx (error)
  • Response Body: JSON object containing user status details.

Error Handling

  • Invalid credentials: 401 Unauthorized
  • Missing/invalid parameters: 400 Bad Request
  • Internal server error: 500 Internal Server Error